<template>
	<div>
		<!-- 父子组件的关系 -->
		<!-- {{ myData }} -->
		<!-- var Son = { data: MyData } -->
		<Son @getdata="getSon" :data="myData"></Son>
	</div>
</template>

<script>
import Son from './Son.vue'
export default {
	data() {
		return {
			myData: '我是来自父组件的数据',
		}
	},
	components: { Son },
	methods: {
		getSon(text) {
			this.myData = text
		},
	},
}
</script>